#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main(void)
{
	int first, second;
	int n;
	printf("input base digit:");
	scanf("%d", &second);
	printf("now input first digit:");
	scanf("%d",&first);
	while (first > 0)
	{
		printf("%d %% %d is %d\n", first, second,(first%second));
		scanf("%d", &first);
	}
	return 0;
}